package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysMemberFinanceMapper;
import com.ruoyi.system.domain.SysMemberFinance;
import com.ruoyi.system.service.ISysMemberFinanceService;

/**
 * 会员财务Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-07
 */
@Service
public class SysMemberFinanceServiceImpl implements ISysMemberFinanceService 
{
    @Autowired
    private SysMemberFinanceMapper sysMemberFinanceMapper;

    /**
     * 查询会员财务
     * 
     * @param id 会员财务主键
     * @return 会员财务
     */
    @Override
    public SysMemberFinance selectSysMemberFinanceById(String id)
    {
        return sysMemberFinanceMapper.selectSysMemberFinanceById(id);
    }

    /**
     * 查询会员财务列表
     * 
     * @param sysMemberFinance 会员财务
     * @return 会员财务
     */
    @Override
    public List<SysMemberFinance> selectSysMemberFinanceList(SysMemberFinance sysMemberFinance)
    {
        return sysMemberFinanceMapper.selectSysMemberFinanceList(sysMemberFinance);
    }

    /**
     * 新增会员财务
     * 
     * @param sysMemberFinance 会员财务
     * @return 结果
     */
    @Override
    public int insertSysMemberFinance(SysMemberFinance sysMemberFinance)
    {
        sysMemberFinance.setCreateTime(DateUtils.getNowDate());
        return sysMemberFinanceMapper.insertSysMemberFinance(sysMemberFinance);
    }

    /**
     * 修改会员财务
     * 
     * @param sysMemberFinance 会员财务
     * @return 结果
     */
    @Override
    public int updateSysMemberFinance(SysMemberFinance sysMemberFinance)
    {
        sysMemberFinance.setUpdateTime(DateUtils.getNowDate());
        return sysMemberFinanceMapper.updateSysMemberFinance(sysMemberFinance);
    }

    /**
     * 批量删除会员财务
     * 
     * @param ids 需要删除的会员财务主键
     * @return 结果
     */
    @Override
    public int deleteSysMemberFinanceByIds(String[] ids)
    {
        return sysMemberFinanceMapper.deleteSysMemberFinanceByIds(ids);
    }

    /**
     * 删除会员财务信息
     * 
     * @param id 会员财务主键
     * @return 结果
     */
    @Override
    public int deleteSysMemberFinanceById(String id)
    {
        return sysMemberFinanceMapper.deleteSysMemberFinanceById(id);
    }
}
